package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.StockOutcomeBillItem;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StockOutcomeBillItemMapper extends BaseMapper<StockOutcomeBillItem>{
   void deleteByBillId(Long billId);

    /**
     * 根据billId 和 itemId 退货,
     * @param itemId
     * @param billId
     */
    void saleItemReturn(@Param("billId") Long billId, @Param("itemId") Long itemId);

    /**
     * 根据billID退整张单的明细
     * @param billId
     */
    void saleItemReturnByBillId(Long billId);

    /**
     * 通过小票id 查询对应所有明细
     * @param billId 小票id
     * @return
     */
    List<StockOutcomeBillItem> selectByBillId(Long billId);
}